home *** CD-ROM | disk | FTP | other *** search
- %%BeginFile: adobe_psp_nup
- %%Copyright: Copyright 1990-1993 Adobe Systems Incorporated. All Rights Reserved.
- /nx Z
- /ny Z
- /pagew Z
- /pageh Z
- /angle Z
- /paperw Z
- /paperh Z
- /nups Z
- /pgx Z
- /pgy Z
- /imT matrix def
- /papermarg 1 def
- /pagemarg 10 def
- /nupv 5 array def
- /framenup true def
- /definenup{
- nupv astore pop
- }bd
- /startnup{
- imT currentmatrix pop
- nupv aload pop
- /ny xs
- /nx xs
- /pageh xs
- /pagew xs
- rotate
- clippath/nups pathbbox
- 3 -1 roll sub papermarg sub ny div pagemarg sub pageh div exch
- 3 -1 roll sub papermarg sub nx div pagemarg sub pagew div
- 2 copy gt{exch}if pop store
- nups dup scale
- /paperw pagew pagemarg nups div add store
- /paperh pageh pagemarg nups div add store
- pathbbox mT aload pop
- pagemarg nups div dup
- 8 index 11 index sub paperh ny mul sub add 2 div exch
- 9 index 12 index sub paperw nx mul sub add 2 div
- 8 -2 roll add 0 gt{9}{neg 7}ifelse index add 4 -1 roll sub exch
- 5 -2 roll add 0 gt{5}{neg 3}ifelse index add 3 -1 roll sub :T pop pop pop pop
- /paperw paperw paperh mT idtransform abs/paperh xs abs store
- /pagew pagew pageh mT idtransform abs/pageh xs abs store
- mT 0 get abs mT 1 get abs lt{/nx ny/ny nx store store}if
- .48 nups div lw
- /pgx 0 store/pgy 0 store
- np startpage
- }bd
- /startpage{
- gS
- 0 0 mT transform pagew pageh mT dtransform rC
- }bd
- /realshowpage/showpage ld
- /nupshowpage{
- gR
- mT concat
- framenup{pagemarg 2 div nups div dup mT idtransform abs neg exch abs neg exch paperw paperh rS}if
- /pgx pgx 1 add dup nx eq{
- pop 0 store
- paperw 1 nx sub mul
- /pgy pgy 1 add dup ny eq{
- gS realshowpage gR
- pop 0 store
- paperh 1 ny sub mul
- }{
- store paperh
- }ifelse
- }{
- store paperw 0
- }ifelse :T
- mT $m invertmatrix concat startpage
- }bd
- /showpage/nupshowpage ld
- /finalpage{
- gR
- pgx 0 gt pgx nx lt and pgy 0 gt pgy ny lt and or{realshowpage}if
- /showpage/realshowpage ld
- }bd
- /nonup{
- pgx 0 gt pgx nx lt and pgy 0 gt pgy ny lt and or{realshowpage}if
- gR/pgx 0 store/pgy 0 store
- 1 setcopies
- /showpage{
- realshowpage
- md/copies known{copies setcopies}if
- md/startnup known{startnup}if
- /showpage/nupshowpage ld
- }def
- /pm save store
- imT setmatrix pT concat
- }bd
- %%EndFile
-